<template>
	<view class=" payInfo _width" v-if="order.status==2">
		<view class="isExpired" v-if="isExpired">
			订单已失效
		</view>
		<view class="pleaserHorder _width " v-else>
			请在
			<view class="time">{{remainingTime}} </view>
			内支付，逾期订单将自动取消。
		</view>
	</view>
	<view class="order _width">
		<view class="card address _width" v-if="address&&order.status=='2'">
			<view class="AddressList _width flex" @click="addAddress">
				<view class="left">
					<view class="label1 dian1">
						{{address.province_name}}&nbsp;{{address.city_name}}&nbsp;{{address.county_name}}
					</view>
					<view class="label2  dian2">{{address.address}}</view>
					<text class="label3 block">{{address.consignee}}&nbsp;{{address.mobile}}</text>
				</view>
				<view class="right" >
					<image src="https://img.zhizhuangtong.com/project_media/img/xcx/rightTag.png" />
				</view>
			</view>
		</view>
        <view class="card address _width" v-else>
        	<view class="AddressList _width flex">
        		<view class="left">
        			<view class="label1 dian1">
        				{{address.province_name}}&nbsp;{{address.city_name}}&nbsp;{{address.county_name}}
        			</view>
        			<view class="label2  dian2">{{address.address}}</view>
        			<text class="label3 block">{{address.consignee}}&nbsp;{{address.mobile}}</text>
        		</view>
        	</view>
        </view>
		<!-- 商家信息 -->
		<view class="card merchant flex _width">
			<view class="title _width flex" v-if="order.corp&&order.corp.company_name">
				<image src="https://img.zhizhuangtong.com/project_media/img/xcx/merchant.png" class="icon" />
				<view class="right">
					<text class="label dian">{{order.corp.company_name}}</text>
				</view>
			</view>

			<view class="goodsInfo  _width flex" v-for="(items,indexs) in order.goods" :key="indexs" @click="goto(items.goods_id,items.sku_id)">
				<image :src="items.img" class="cover" />
				<view class="right">
					<view class="title _width flex">
						<text class="name dian">{{items.sku_name}}</text>
						<!-- <text class="monery">¥&nbsp;{{items.price}}</text> -->
					</view>
					<view class="title _width flex">
						<view class="size _width flex" v-if="items.size">
							尺寸：{{items.size}}
						</view>
						
					</view>
					<view class="bottom">
						<view class="leftRow"> 
							<!-- <text class="monery">¥&nbsp;{{items.price}}</text> -->
							
							<!-- 有优惠 -->
							<view class="monery1" v-if="items.activity_id">
								<view class="col1">
									<text class="price">¥{{items.subsidy_price}}</text>
									<text class="pricetype">到手价</text>
								</view>
								<text class="price2">¥{{ items.money }}</text>
							</view>
							<!-- 没有优惠 -->
							<view class="monery" v-else>
								¥{{ items.price }}
							</view>
						</view>
						<view class="number _width flex">
							共{{items.num}}件
						</view>
					</view>
				</view>
			</view>

			<!-- <view class="menu  _width flex">
				<text class="leftLabel">配送</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="delivery _width dian">商家配送</view>
						
					</view>
					
				</view>
			</view> -->

			<!-- 			<view class="menu  _width flex">
				<text class="leftLabel">备注</text>
				<view class="right flex">
					<view class="titles _width flex" @click="Masker">
						<view class="tips _width">建议留言前，先与商家沟通确认</view>
					</view>
					<image src="https://img.zhizhuangtong.com/project_media/img/xcx/rightTag.png" class="tag" />

				</view>
			</view> -->

		</view>


		<!-- 订单信息 -->
		<view class="card orderInfo _width flex" style="padding-bottom: 0;">
			<view class="menu  _width flex">
				<text class="leftLabel">商品金额</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="monery _width flex" style="
							color: #333;">
							¥&nbsp; {{order.goods_money}}</view>
					</view>
				</view>
			</view>

			<view class="menu  _width flex">
				<text class="leftLabel">运费</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="monery _width flex" style="
							color: #DF3033;">&nbsp;
							¥ {{order.postage}}</view>
					</view>
				</view>
			</view>
			<view class="menu  _width flex">
				<text class="leftLabel">平台补贴</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="monery _width flex" style="
							color: #DF3033;">&nbsp;
							¥ {{order.subsidy_money}}</view>
					</view>
				</view>
			</view>
			<view class="menu  _width flex">
				<text class="leftLabel">优惠券</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="monery _width flex">&nbsp;
							无</view>
					</view>
				</view>
			</view>

			<view class="menu totalRow _width flex">
				<view class="rows">
					<view class="total flex ">共减</view>
					<view class="totalMonery  flex">&nbsp;¥ {{order.subsidy_money}}</view>
				</view>
				<view class="rows">
					<view class="total flex ">{{order.status==2||order.status==1?'应':'实'}}付金额</view>
					<view class="totalMonery  flex">&nbsp;¥ {{order.need_pay}}</view>
				</view>
				
			</view>
		</view>

		<view class="card orderInfo _width flex">
			<view class="menu  _width flex">
				<text class="leftLabel">订单信息</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="monery _width flex">
						</view>
					</view>
				</view>
			</view>
			<view class="menu  _width flex">
				<text class="leftLabel">订单编号</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="monery _width flex">
							&nbsp; {{order.order_no}}</view>
					</view>
				</view>
			</view>

			<view class="menu  _width flex">
				<text class="leftLabel">支付方式</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="monery _width flex">&nbsp;
							{{order.pay_channel_text}}
						</view>
					</view>
				</view>
			</view>

			<view class="menu  _width flex" v-if="order.status==2" @click="onInvalid">
				<text class="leftLabel">是否开发票</text>
				<view class="right flex">
					<view class="titles _width flex_row_btw_center">
						<view class="monery _width flex">&nbsp;
							{{order.invoice_type==0?'不开发票':order.invoice_type=='1'?'个人':'企业'}}
							<image src="https://img.zhizhuangtong.com/project_media/img/xcx/rightTag.png" class="imgs"
								 v-if="order.status==2" />
						</view>

					</view>

				</view>
			</view>
			
			<view class="menu  _width flex" v-else>
				<text class="leftLabel">是否开发票</text>
				<view class="right flex">
					<view class="titles _width flex_row_btw_center">
						<view class="monery _width flex">&nbsp;
							{{order.invoice_type==0?'不开发票':order.invoice_type=='1'?'个人':'企业'}}
						</view>
			
					</view>
			
				</view>
			</view>
			<view class="menu  _width flex">
				<text class="leftLabel">配送方式</text>
				<view class="right flex">
					<view class="titles _width flex">
						<view class="monery _width flex">&nbsp;
							{{order.send_type_text}}
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 填写备注 -->
		<!-- 		<up-popup v-model:show="showModal" closeable="true">
			<view class="maskerRow">
				<text class="label">备注填写</text>
				<up-textarea v-model="masker" placeholder="请输入备注" clearable maxlength="200"></up-textarea>

				<view class="btn">
					<button @click="saveMasker">确定</button>
				</view>
			</view>
		</up-popup> -->


		<!-- 底部按钮 -->
		<view class="bottomFexBtn" v-if="order.status=='2'||order.status=='3'||order.status=='4'">
			<view class="rowConter">
				<view class="btn1" @click="closeOrder(order.id,'close')" v-if="order.status=='2'">
					取消订单
				</view>
				<view class="row" v-if="order.status=='3'||order.status=='4'"></view>
				<view class="row">
					<!-- 代发货显示取消订单按钮 -->
					<view class="btn" @click="closeOrder(order.id,'close')" v-if="order.status=='3'">
						取消订单
					</view>
					<view class="btn" @click="closeOrder(order.id,'collect')" v-if="order.status=='4'">
						确认收货
					</view>
					<view class="btn2 flex-column-center-center" @click="submitOrderClick" v-if="order.status=='2'">
						<text class="name">立即支付</text>
						<view class="price">
							<text>¥{{order.need_pay}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<up-popup :show="showClose" :round="10" mode="center" @close="showClose = false" @open="showClose = true">
			<closeItem @closeModel="showClose = false" @saveModel='orderClose' ref="closeOrderRef" />
		</up-popup>

		<!-- 设置发票 -->
		<up-popup :show="showModalInvoice" :round="10" mode="bottom" @close="showModalInvoice = false"
			@open="showModalInvoice = true">
			<invoice @closeModel="showModalInvoice = false" @saveModel='invoiceClose' ref="invoiceRef" />
		</up-popup>
	</view>
</template>

<script setup>
	import closeItem from '@/components/closeItem.vue'
	import {
		detailsData,
		orderAddress
	} from '@/api/mineOrder.js'
	import invoice from '@/components/invoice.vue'
	import {
		onLoad,
		onShow,
		onUnload,
		onHide,
		onReady,
		onReachBottom,
		onPullDownRefresh
	} from '@dcloudio/uni-app';
	import {
		ref,
		reactive,
		onMounted
	} from 'vue';
	// const showModal = ref(false) //备注填写
	const masker = ref('') //备注
	const params = ref({
		buy: [], //直接购买参数
		token: '',
		source: '',
		address_id: 0, //地址id,不传使用默认地址  
		remarks: '', //备注,key=企业id,value=备注信息  
		send_type: 1, //配送方式,key=企业id,value=配送方式:1=商家配送,2=自提  
		pay_channel: 1, //支付方式,1=在线支付  
		invoice_type: 0, //发票,默认0:0=不开票,1=个人,2=企业  
	})
	const order = ref({}) //订单预览信息
	const orderId = ref('')
	const remainingTime = ref(""); // 剩余时间的显示
	const isExpired = ref(false); // 是否过期
	const targetTime = ref(''); // 截止时间
	let timer = null; // 定时器引用

	const address = ref()
	onLoad((option) => {
		console.log('222222')
		orderId.value = option.id

	})
	onReady(() => {
		console.log('3333')
	})

	onShow(() => {
		console.log('4444666')
		// 监听 refreshIfNeeded 事件
		uni.$on('refreshIfNeeded2', function(dat, id) {
			if (dat) {
				params.value.address_id = id
				console.log('地址信息', params.value.address_id)
				setUpdate()
			}
			// // 取消监听
			uni.$off('refreshIfNeeded2');
		});
		queryOrderDetails() //订单预览
		// }
	})
	//更新地址信息
    const setUpdate = async () => {
    	const resp = await orderAddress({
    		id: orderId.value,
    		address_id: params.value.address_id
    	});
    	if (resp.code === 1) {
    		uni.showToast({
    			icon: 'none',
    			title: resp.msg,
    		});
    		queryOrderDetails() //订单预览
    	} else {
    		uni.showToast({
    			icon: 'none',
    			title: resp.msg,
    		});
    	}
    }
	// 将目标时间转换为兼容 iOS 的格式
	const convertToIOSCompatibleFormat = (time) => {
		// 假设返回的时间格式为 "yyyy-MM-dd HH:mm:ss"
		if (time) {
			// 替换空格为T，变为 "yyyy-MM-ddTHH:mm:ss" 格式
			return time.replace(" ", "T");
		}
		return time; // 如果已经是合适的格式，则直接返回
	};



	const calculateRemainingTime = () => {
		const now = new Date();
		const endTime = new Date(targetTime.value); // 使用正确的格式进行日期转换
		const timeDifference = endTime - now;

		if (timeDifference <= 0) {
			isExpired.value = true;
			clearInterval(timer); // 停止倒计时
			remainingTime.value = "订单已失效";
			return;
		}
		const hours = Math.floor(timeDifference / (1000 * 60 * 60));
		const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
		const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
		remainingTime.value = `${hours}:${minutes}:${seconds}`;
	};



	// 启动倒计时
	const startCountdown = () => {
		calculateRemainingTime();
		timer = setInterval(calculateRemainingTime, 1000);
	};


	onHide(() => {
		clearInterval(timer); // 页面卸载时清除定时器
	});
	// 订单预览
	const queryOrderDetails = async () => {
		const res = await detailsData({
			id: orderId.value
		});
		if (res.code === 1) {
			const _data = res.data
			order.value = _data.order;
			targetTime.value = convertToIOSCompatibleFormat(res.data.order.auto_cancel);
			startCountdown(); // 页面加载时启动倒计时
			let newVal = order.value.status == '2' ? '等待付款' : order.value.status == '3' ? '待发货' : order.value
				.status == '4' ? '待收货' : order.value.status == '5' ? '订单详情' : "已失效"
			console.log(newVal)
			params.value.address_id = order.value.address.id
			address.value = order.value.address
			uni.setNavigationBarTitle({
				title: newVal
			}); // 动态设置导航栏标题
		} else {
			uni.navigateBack()
			uni.showToast({
				icon: 'none',
				title: res.msg
			})
		}
	}

	// 添加地址
	const addAddress = () => {
		console.log('设置地址')
		uni.navigateTo({
			url: '/pages/order/address/index'
		})
	}

	// 备注
	// const Masker = () => {

	// 	showModal.value = true;
	// }
	// 保存备注
	// const saveMasker = () => {
	// 	showModal.value = false;
	// }

	// 提交订单 去收银台
	const submitOrderClick = async () => {

		if (params.value.address_id == 0) {
			uni.showToast({
				icon: 'none',
				title: '请选择地址'
			});
			return
		}
		setTimeout(() => {
			if (order.value.id) {
				const navigateUrl =
					`/pages/order/cashierCounter/index?order_id=${order.value.id}`;
				uni.navigateTo({
					url: navigateUrl
				});
			}
		}, 500);
	};



	const showClose = ref(false)
	const closeOrderRef = ref()
	// 取消订单
	const closeOrder = async (id, type) => {
		showClose.value = true
		closeOrderRef.value.type = type
		closeOrderRef.value.orderId = id
		if(type=='close'){
			closeOrderRef.value.isShowInfo = order.value.subsidy_money>0?1:0
		}else{
			closeOrderRef.value.isShowInfo = 0
		}
		
	}
	const orderClose = () => {
		showClose.value = false
		setTimeout(() => {
			// uni.redirectTo({
			// 	url:'/pages/mineB/mineOrder/mineOrderList/index'
			// })
			uni.navigateBack({
				delta:1
			})
		}, 500);
		uni.$emit('refreshIfNeeded1', true)
	}
    onUnload(()=>{
		uni.$off('refreshIfNeeded1')
	})
	const showModalInvoice = ref(false) //设置发票
	const invoiceRef = ref()
	// 设置发票
	const onInvalid = () => {
		showModalInvoice.value = true;
		setTimeout(()=>{
			invoiceRef.value.addressDetails()
			invoiceRef.value.addressForm.type = order.value.invoice_type
			invoiceRef.value.orderId = order.value.id
		},100)
	}
	//保存关闭
	const invoiceClose = ()=>{
		showModalInvoice.value = false
		queryOrderDetails()
	}
	
	// 去详情
	const goto = (id, skuId) => {
		uni.navigateTo({
			url: '/pages/find/homeFurnish/index?id=' + id + '&skuId=' + skuId
		});
	}
</script>

<style lang="scss" scoped>
	.isExpired {
		text-align: center;
		color: #666666;
	}

	.pleaserHorder {
		background-color: #fff;
		width: 100%;
		height: 80rpx;
		text-align: center;
		line-height: 80rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #666666;

		.time {
			color: #FF3535;
			text-align: center;
			display: inline-block;
		}
	}

	.order {
		min-height: 100vh;
		padding-top: 20rpx;
		padding-left: 30rpx;
		padding-right: 30rpx;
		padding-bottom: calc(150rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(150rpx + env(safe-area-inset-bottom));
		box-sizing: border-box;



		.card {
			// min-height: 170rpx;
			background: #FFFFFF;
			padding: 25rpx;
			border-radius: 18rpx;
			box-sizing: border-box;
			margin-bottom: 20rpx;
			// box-shadow: 0 5rpx 8rpx 0 rgba(0, 0, 0, .08);
		}

		.address {
			.label {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #333333;
				line-height: 40rpx;
				text-align: left;
				font-style: normal;
				text-transform: none;
				display: block;
			}

			.isNullAddress {
				align-items: center;
				justify-content: space-between;
				padding: 20rpx 0;
				box-sizing: border-box;

				text {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 26rpx;
					color: #D5A969;
					line-height: 36rpx;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}

				image {
					width: 12rpx;
					height: 20rpx;
					opacity: 0.8;
				}
			}

			.AddressList {
				.left {
					flex: 1;

					.block {
						display: block;
					}

					.label1 {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 26rpx;
						color: #333333;
						line-height: 40rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}

					.label2 {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 32rpx;
						color: #333333;
						line-height: 36rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
						margin: 15rpx 0;
					}

					.label3 {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 26rpx;
						color: #333333;
						line-height: 40rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}

				}

				.right {
					display: flex;
					align-items: center;
					justify-content: flex-end;
					width: 100rpx;

					image {
						width: 12rpx;
						height: 20rpx;
						opacity: 0.8;
					}
				}
			}
		}

		.merchant {
			flex-wrap: wrap;

			.title {
				height: 36rpx;
				align-items: center;

				.icon {
					width: 25rpx;
					height: 25rpx;
					margin-right: 10rpx;
				}

				.right {
					width: calc(100% - 35rpx);
					display: flex;
					align-items: center;

					.label {
						font-family: Source Han Sans CN, Source Han Sans CN;
						font-weight: 500;
						font-size: 28rpx;
						color: #333333;
						line-height: 36rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}

					.tag {
						margin-left: 10rpx;
						width: 12rpx;
						height: 20rpx;
					}
				}
			}

			.goodsInfo {
				margin: 25rpx 0 40rpx;

				.cover {
					width: 150rpx;
					height: 150rpx;
					border-radius: 10rpx;
					margin-right: 20rpx;
					overflow: hidden;
				}

				.right {
					width: calc(100% - 170rpx);
					flex-wrap: wrap;

					.title {
						margin-bottom: 10rpx;
						width: 100%;
						justify-content: space-between;

						.name {
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #333333;
							line-height: 40rpx;
							text-align: left;
							font-style: normal;
							text-transform: none;
						}

						.monery {
							display: flex;
							align-items: center;
							margin-left: 20rpx;
							font-family: Source Han Sans CN, Source Han Sans CN;
							font-weight: 500;
							font-size: 26rpx;
							color: #333333;
							line-height: 36rpx;
							text-align: left;
							font-style: normal;
							text-transform: none;
						}
					}

					.size {
						margin-bottom: 15rpx;
						align-items: center;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #999999;
						line-height: 36rpx;
						text-align: left;
						font-style: normal;
						// flex: 1;
						text-transform: none;
					}

					.stock {
						width: 100%;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #ef4040;
						height: 26rpx;
						line-height: 26rpx;
						margin-top: 15rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}
                    .bottom{
						display: flex;
						.leftRow{
							width: calc(100% - 50rpx);
							padding-right: 10rpx;
							box-sizing: border-box;
							display: flex;
							align-items: center;
							
							
							.monery1 {
								// width: calc(100% - 160rpx);
								width: 100%;
								display: flex;
								align-items: center;
							
								.col1 {
									// width: 100%;
									display: flex;
							
									.price {
										font-family: PingFang SC, PingFang SC;
										font-weight: 500;
										font-size: 34rpx;
										color: #DF3033;
										line-height: 36rpx;
										font-style: normal;
										text-transform: none;
										display: -webkit-box;
										-webkit-box-orient: vertical;
										-webkit-line-clamp: 1;
										overflow: hidden;
									}
							
									.pricetype {
										min-width: 70rpx;
										flex: 1;
										font-family: PingFang SC, PingFang SC;
										font-weight: 400;
										font-size: 24rpx;
										color: #DF3033;
										line-height: 36rpx;
										text-align: left;
										font-style: normal;
										text-transform: none;
										margin-left: 5rpx;
									}
								}
							
								.price2 {
									margin-left: 10rpx;
									font-family: PingFang SC, PingFang SC;
									font-weight: 400;
									font-size: 24rpx;
									color: #8E8E8E;
									line-height: 36rpx;
									text-align: left;
									font-style: normal;
									text-decoration-line: line-through;
									text-transform: none;
								}
							}
							
							.monery {
								font-family: Source Han Sans CN, Source Han Sans CN;
								font-weight: 500;
								font-size: 30rpx;
								color: #333333;
								line-height: 36rpx;
								text-align: left;
								font-style: normal;
								text-transform: none;
							}
							
						}
						
						.number {
							width: 100rpx;
							justify-content: flex-end;
							align-items: center;
							
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #999999;
							line-height: 36rpx;
							text-align: center;
							font-style: normal;
							text-transform: none;
							
						
						}
					}
					
				}
			}


			.menu {
				align-items: center;
				margin-bottom: 30rpx;

				&:last-child {
					margin-bottom: 0;
				}

				.leftLabel {
					width: 122rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #333333;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}

				.right {
					width: calc(100% - 100rpx);
					align-items: center;

					.titles {
						flex: 1;
						flex-wrap: wrap;

						.delivery {
							text-align: right;
							font-family: PingFang SC, PingFang SC;
							font-weight: 500;
							font-size: 24rpx;
							color: #333333;
							font-style: normal;
							text-transform: none;
						}

						.date {
							text-align: right;
							font-family: PingFang SC, PingFang SC;
							font-weight: 500;
							font-size: 24rpx;
							color: #333333;
							font-style: normal;
							text-transform: none;
						}

						.tips {
							display: block;
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 24rpx;
							color: #999999;
							line-height: 30rpx;
							text-align: right;
							font-style: normal;
							text-transform: none;
						}
					}

					.tag {
						padding-left: 20rpx;
						width: 12rpx;
						height: 20rpx;
					}

				}
			}
		}

		// 发票信息
		.invoice {
			align-items: center;
			margin-bottom: 30rpx;

			&:last-child {
				margin-bottom: 0;
			}


			.leftLabel {
				display: block;
				width: 150rpx;
				font-family: Source Han Sans CN, Source Han Sans CN;
				font-weight: 400;
				font-size: 28rpx;
				color: #333333;
				line-height: 36rpx;
				text-align: left;
				font-style: normal;
				text-transform: none;
			}

			.right {
				width: calc(100% - 150rpx);
				align-items: center;
				justify-content: flex-end;

				.tag {
					padding-left: 20rpx;
					width: 12rpx;
					height: 20rpx;
				}

				.titles {
					flex: 1;
					flex-wrap: wrap;

					.monery {
						justify-content: flex-end;
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 24rpx;
						color: #333333;
						font-style: normal;
						text-transform: none;
					}
				}
			}
		}

		// 订单信息
		.orderInfo {
			align-items: center;
			flex-wrap: wrap;
			margin-bottom: 30rpx;
			&:last-child {
				margin-bottom: 0;
			}

			.menu {
				align-items: center;
				margin-bottom: 30rpx;

				&:last-child {
					margin-bottom: 0;
				}


				.leftLabel {
					width: 150rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #333333;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}

				.right {
					width: calc(100% - 100rpx);
					align-items: center;

					.titles {
						flex: 1;
						flex-wrap: wrap;
						.monery1 {
							justify-content: flex-end;
							font-family: PingFang SC, PingFang SC;
							font-weight: 500;
							font-size: 30rpx;
							color: #333333;
							line-height: 36rpx;
							text-align: right;
							font-style: normal;
							text-transform: none;
						}
						.monery {
							justify-content: flex-end;
							font-family: PingFang SC, PingFang SC;
							font-weight: 500;
							font-size: 24rpx;
							color: #333333;
							font-style: normal;
							text-transform: none;
						}
					}
				}

				.total {
					flex: 1;
					justify-content: flex-end;
					font-family: Source Han Sans CN, Source Han Sans CN;
					font-weight: 400;
					font-size: 28rpx;
					color: #333333;
					line-height: 36rpx;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}

				.totalMonery {
					justify-content: flex-end;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #333333;
					font-style: normal;
					text-transform: none;
				}
			}
			.totalRow{
				height: 80rpx;
				display: flex;
				justify-content: space-between;
				border-top: 1rpx solid #E6E6E6;
				.rows{
					display: flex;
					.total{
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 28rpx;
						color: #333333;
						line-height: 36rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}
					.totalMonery{
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 28rpx;
						color: #DF3033;
						line-height: 36rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}
				}
				
			}

		}

		// 备注
		.maskerRow {
			padding: 10rpx 30rpx;
			box-sizing: border-box;

			.label {
				display: block;
				width: 100%;
				font-size: 30rpx;
				font-weight: 700;
				line-height: 80rpx;
				height: 80rpx;
				box-sizing: border-box;
			}

			::v-deep .u-textarea {
				width: 100%;
				// border: none !important;
				margin-bottom: 20rpx;
				box-sizing: border-box;
			}

			.btn {
				width: 100%;
				padding: 0 30rpx;
				display: flex;
				justify-content: center;
				box-sizing: border-box;
				margin-top: 40rpx;

				button {
					width: 100%;
					height: 88rpx;
					background: linear-gradient(138deg, #EDA55B 0%, #D09A47 100%);
					border-radius: 14rpx;
					font-family: PingFangSC, PingFang SC;
					font-weight: 500;
					font-size: 32rpx;
					color: #FFFFFF;
					line-height: 88rpx;
					font-style: normal;
				}

			}

		}


		.bottomFexBtn {
			position: fixed;
			left: 0;
			bottom: 0;
			z-index: 5;
			padding-bottom: env(safe-area-inset-bottom);
			padding-bottom: constant(safe-area-inset-bottom);
			height: calc(120rpx + env(safe-area-inset-bottom));
			height: calc(120rpx + constant(safe-area-inset-bottom));
			width: 100%;
			// background-color: #000000 !important;
			backdrop-filter: blur(10px) !important;
			background-color: rgba(255, 255, 255, .82) !important;
			// box-shadow: 0rpx -4rpx 6rpx 0rpx rgba(0, 0, 0, 0.05);
			box-sizing: border-box;
			display: flex;
			align-items: flex-start;

			.rowConter {
				padding: 15rpx 25rpx;
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.btn1 {
					font-weight: 400;
					font-size: 26rpx;
					color: #666666;
				}

				.row {
					display: flex;
					justify-content: center;
					align-items: center;

					.price {
						font-family: Source Han Sans CN, Source Han Sans CN;
						font-weight: 500;
						font-size: 34rpx;
						color: #333333;
						font-style: normal;
						text-transform: none;
					}

					.btn2 {
						padding-left: 44rpx;
						padding-right: 44rpx;
						height: 80rpx;
						background: linear-gradient(113deg, #F2BD6F 0%, #CCA05F 100%);
						border-radius: 20rpx;
						font-family: Source Han Sans CN, Source Han Sans CN;
						font-weight: 500;
						font-size: 32rpx;
						color: #FFFFFF;

						.name {
							font-weight: 500;
							font-size: 22rpx;
							color: #FFFFFF;
							text-align: center;
						}

						.price {
							text-align: center;
							font-weight: 600;
							font-size: 30rpx;
							color: #FFFFFF;
						}
					}

					.btn {
						width: 220rpx;
						height: 80rpx;
						background: linear-gradient(113deg, #F2BD6F 0%, #CCA05F 100%);
						border-radius: 20rpx;
						font-family: Source Han Sans CN, Source Han Sans CN;
						font-weight: 500;
						font-size: 32rpx;
						color: #FFFFFF;
						line-height: 80rpx;
						text-align: center;
						font-style: normal;
						text-transform: none;

					}
				}
			}
		}

	}

	.imgs {
		width: 12rpx;
		height: 20rpx;
		opacity: 0.8;
		text-align: center;
		line-height: 16rpx;
		margin-left: 10rpx;
		margin-top: 6rpx;
	}
</style>